﻿Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Imports Microsoft.SqlServer.Server


Partial Public Class StoredProcedures
    Private Shared Function OutputResults(ByVal SectionHeading As String, ByVal ObjStream As System.IO.StreamReader) As Integer
        Dim _sStreamString As String

        Try
            SqlContext.Pipe.Send(vbCrLf & SectionHeading)

            While ObjStream.EndOfStream = False
                _sStreamString = ObjStream.ReadLine

                SqlContext.Pipe.Send(_sStreamString)
            End While
        Catch ex As Exception
            Throw New Exception("Exception Occurred in: OutputResults", ex)
        End Try
    End Function
End Class
